package com.chen.cotroller;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Hello world!
 *
 */
//@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
//@SpringBootConfiguration
//@MapperScan("com.chen.mapper")
@SpringBootApplication
@MapperScan(basePackages = {"com.chen.mapper", "com.chen.service.impl"})
//@ComponentScan("com.chen.cotroller")
//@EnableTransactionManagement//如果mybatis中的service中有注解则需要添加此注解
public class App /*extends SpringBootServletInitializer*/ {

    /*@Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder)
    {
        return super.configure(builder);
    }
    */

    public static void main(String[] args) throws Exception {
//        SqlSessionFactory sq =
        SpringApplication.run(App.class, args);
        System.out.println("(♥◠‿◠)ﾉﾞ  启动成功   ლ(´ڡ`ლ)ﾞ  \n" +
                " .-------.       ____     __        \n" +
                " |  _ _   \\      \\   \\   /  /    \n" +
                " | ( ' )  |       \\  _. /  '       \n" +
                " |(_ o _) /        _( )_ .'         \n" +
                " | (_,_).' __  ___(_ o _)'          \n" +
                " |  |\\ \\  |  ||   |(_,_)'         \n" +
                " |  | \\ `'   /|   `-'  /           \n" +
                " |  |  \\    /  \\      /           \n" +
                " ''-'   `'-'    `-..-'              ");
    }
}
